package org.example.cloud.controller;

import jakarta.annotation.Resource;
import org.example.cloud.service.AccountService;
import org.example.cloud.util.ResultData;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 宋孟林
 * @description
 * @date: 2025/4/12 10:55
 */
@RestController
public class AccountController {
    @Resource
    private AccountService accountService;
    @PostMapping("/account/decrease")
    public ResultData<?> decrease(Long userId, Long money){
        accountService.decrease(userId, money);
        return ResultData.success("扣钱成功");
    }
}
